package demo2;

public class Tect {

    public static void main(String[] args) throws RuntimeException{
        Student student1 = new Student("张三",1);
        Student student2 = (Student) student1.clone();
        System.out.println(student2);
        int[] array = new int[]{1,2,3,4};
        System.out.println(array);
        try {

        }catch (ArrayIndexOutOfBoundsException e){
e.setStackTrace();
        }catch (NullPointerException e){

        }
    }

    public static void main1(String[] args) {
        Game game = new Game();
        try {
            game.func("慌友", 123);
        } catch (PassWordException e) {
            System.out.println("捕获到了PassWordException异常");
            e.printStackTrace();
        } catch (GameNameException e) {
            System.out.println("捕获到了GameNameException异常");
            e.printStackTrace();
        }
    }

}
